package jmine.tec.hydra;

import bancosys.tec.exception.LocalizedMessageHolder;
import bancosys.tec.exception.MessageCreator;
import bancosys.tec.exception.MessageCreatorHelper;

/**
 * @author lundberg
 */
public enum HydraMessages implements MessageCreator {
    PARSE(0, "jmine.tec.hydra.parse"),

    UNEXPECTED_ERROR(0, "jmine.tec.hydra.unexpectedError"),

    DECODE_SCRIPT_NOT_DEFINED(2, "jmine.tec.hydra.decode.scriptNotDefined"),

    SEND_SENDER_NOT_DEFINED(2, "jmine.tec.hydra.send.senderNotDefined"),

    ERRO_CRIACAO_SERVICO(1, "jmine.tec.hydra.erro.criacao.servico"),

    DECODE_IO(0, "jmine.tec.hydra.decode.io"),

    SYSTEM_UNSUPPORTED_ENCODING(2, "jmine.tec.hydra.system.unsupported.encoding"),

    COULD_NOTCREATE_MESSAGE(2, "jmine.tec.hydra.couldNotcreateMessage"),

    RECEIVE_FILE_FILENAME(1, "jmine.tec.hydra.receive.file.filename"),

    RECEIVE_NO_ACTION_FOUND(1, "jmine.tec.hydra.receive.noActionFound"),

    RECEIVE_SCRIPT_ERROR(1, "jmine.tec.hydra.receive.scriptError"),

    RTM(1, "jmine.tec.hydra.rtm"),

    ENCODE_SCRIPTS_NOT_DEFINED(2, "jmine.tec.hydra.encode.scriptsNotDefined"),

    REQUEST_ERROR(1, "jmine.tec.hydra.request.error"),

    VELOCITY_TEMPLATE(0, "jmine.tec.hydra.velocity.template"),

    SEND_UNEXPECTED_ERROR(2, "jmine.tec.hydra.send.unexpectedError"),

    BSH_LIBRARY(1, "jmine.tec.hydra.bsh.library"),

    DECODE_NO_IDENTIFICATION_FOUND(0, "jmine.tec.hydra.decode.noIdentificationFound"),

    SEND_NO_ACTION_FOUND(2, "jmine.tec.hydra.send.noActionFound"),

    BSH_ACTIVATION(1, "jmine.tec.hydra.bsh.activation"),

    RECEIVE_FILE_RECEIVER(2, "jmine.tec.hydra.receive.file.receiver"),

    VELOCITY_INIT(0, "jmine.tec.hydra.velocity.init"),

    SEND_FILE_ERROR(2, "jmine.tec.hydra.send.file.error"),

    BSH_DECODE(1, "jmine.tec.hydra.bsh.decode"),

    BSH_ENCODE(1, "jmine.tec.hydra.bsh.encode"),

    RECEIVE_BSH_NO_ACTIVATIONFOUND(1, "jmine.tec.hydra.receive.bsh.noActivationfound"),

    RECEIVE_UNEXPECTED_ERROR(0, "jmine.tec.hydra.receive.unexpectedError"),

    BSH_CREATE(0, "jmine.tec.hydra.bsh.create"),

    ENCODE_NO_IDENTIFICATION(0, "jmine.tec.hydra.encode.noIdentification"),

    RECEIVE_FILE_ERROR(1, "jmine.tec.hydra.receive.file.error"),

    RECEIVE_PROCESS_SERVICES_ERROR(0, "jmine.tec.hydra.receive.processServicesError"),

    RECEIVE_MQ_RECEIVER(1, "jmine.tec.hydra.receive.mq.receiver"),

    RECEIVE_FILTER_ERROR(3, "jmine.tec.hydra.receive.filter.error"),

    RECEIVE_RESETABLE_INPUT_STREAM_ERROR(1, "jmine.tec.hydra.receive.resetableInputStreamError"),

    RECEIVE_NO_CONVERSATION_FOR_IDFOUND(1, "jmine.tec.hydra.receive.noConversationForIDFound"),

    SEND_NO_SPECIFICATION_FOUND(1, "jmine.tec.hydra.send.noSpecificationFound"),

    RECEIVE_FILE_MESSAGE_CODE(1, "jmine.tec.hydra.receive.file.message.code"),

    SEND_NO_ACTIVATION_FOUND(1, "jmine.tec.hydra.send.noActivationFound"),

    UNABLE_TOMOVE_MESSAGE(0, "jmine.tec.hydra.unableTomoveMessage"),

    RECEIVE_NO_SPECIFICATION_FOUND(2, "jmine.tec.hydra.receive.noSpecificationFound"),

    SPECIFICATION_SCHEDULE_INVALID_CRONEXPRESSION(3, "jmine.tec.hydra.specification.schedule.invalid.cronexpression"),

    RECEIVE_MQ_SYSTEM(0, "jmine.tec.hydra.receive.mq.system"),

    SEND_FILTER_ERROR(3, "jmine.tec.hydra.send.filter.error"),

    RECEIVE_ACTIVATION_UNEXPECTED_ERROR(0, "jmine.tec.hydra.receive.activationUnexpectedError"),

    SPECIFICATION_NOT_FOUND_SYSTEM_ACTION(2, "jmine.tec.hydra.specification.not.found.for.system.action"),

    UNABLE_TO_SEND(1, "jmine.tec.hydra.mq.sender.unable.to.send"),

    REQUEST_NOT_FOUND(3, "jmine.tec.hydra.services.request.not.found"),

    TOO_MANY_REQUESTS(4, "jmine.tec.hydra.services.too.many.requests"),

    SPECIFICATION_SENT_SUCESS(0, "jmine.tec.hydra.specification.sent.sucess"),

    SENDING_INTEGRATION_FROM_SPECIFICATION(2, "jmine.tec.hydra.sending.integration.from.specification"),

    SYSTEM_NOT_FOUND(1, "jmine.tec.hydra.specification.system.not.found");

    private final MessageCreator delegate;

    /**
     * Construtor
     * 
     * @param nargs nargs
     * @param key key
     */
    private HydraMessages(int nargs, String key) {
        this.delegate = MessageCreatorHelper.creator("hydra-messages", key, nargs);
    }

    /**
     * {@inheritDoc}
     */
    public LocalizedMessageHolder create(Object... arguments) {
        return this.delegate.create(arguments);
    }

    /**
     * {@inheritDoc}
     */
    public int getExpectedArguments() {
        return this.delegate.getExpectedArguments();
    }
}
